{% extends 'admin/layout.html.twig' %}

{% block title %}{{'admin.version_setting.content_title'|trans}} - {{ parent() }}{% endblock %}

{% set menu = 'admin_setting_message' %}

{% block content %}
<div class="page-header"><h1>{{'admin.version_setting.content_title'|trans}}</h1></div>

{{ web_macro.flash_messages() }}

<form class="form-horizontal" method="post" novalidate>

  <div class="form-group">
    <div class="col-md-3 control-label">
      <label>{{'admin.version_setting.app'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <select class="form-control" name="code">
        {% for app in apps %}
          <option value="{{ app.code }}">{{ app.name }} - {{ app.code }} - {{ app.version }}</option>
        {% endfor %}
      </select>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-3 control-label">
      <label>{{'admin.version_setting.roll_back_specified_version'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <input class="form-control" type="text" name="version" value="">
    </div>
  </div>

  <div class="form-group">
    <div class="controls col-md-offset-3 col-md-8">
      <button type="submit" class="btn btn-primary">{{'form.btn.submit'|trans}}</button>
    </div>
  </div>

  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">

</form>

<div class="alert alert-danger">
  <h4>{{'admin.version_setting.need_careful_tips'|trans}}</h4>
  <ul>
    <li>{{'admin.version_setting.developer_use_tips'|trans}}</li>
  </ul>
</div>

{% endblock %}